package cn.tedu.shopol.taojin.controller;


import cn.tedu.shopol.taojin.model.UserAddress;
import cn.tedu.shopol.taojin.service.IUserAddressService;
import cn.tedu.shopol.taojin.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author tedu.cn
 * @since 2020-12-08
 */
@RestController
@RequestMapping("/taojin/userAddress")
public class UserAddressController {

    @Autowired
    IUserAddressService addressService;

    //http://localhost:8080/taojin/userAddress/1
    @GetMapping("/{addressId}")
    R getAddress(@PathVariable("addressId") Integer addressId){
        return R.ok(addressService.getAddress(addressId));
    }
}
